package com.example.student.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.student.entity.SysTokenBlacklist;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * 系统令牌黑名单Mapper接口
 */
@Mapper
public interface SysTokenBlacklistMapper extends BaseMapper<SysTokenBlacklist> {

    /**
     * 根据token查询记录数
     *
     * @param token JWT令牌
     * @return 记录数
     */
    @Select("SELECT COUNT(*) FROM sys_token_blacklist WHERE token = #{token}")
    int selectCountByToken(@Param("token") String token);
} 